<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>
<%@ taglib uri="/WEB-INF/tlds/att_list.tld" prefix="attlist"%>
<script  type="text/javascript" src="${staticPath}/js/bpm/workflow/workflow_view.js"></script> 
<script  type="text/javascript" src="${staticPath}/js/bpm/workflow/workflow_common.js"></script>
<script  type="text/javascript" src="${staticPath}/js/iframeheight.min.js"></script> 
<script type="text/javascript">
	var PATH="${contextPath}";
</script>
<style type="text/css">      
      #BgDiv{background-color:#e3e3e3; position:absolute; z-index:99; left:0; top:0; display:none; width:100%; height:1000px;opacity:0.5;filter: alpha(opacity=50);-moz-opacity: 0.5;}
      
      #DialogDiv{position:absolute;width:400px; left:50%; top:50%; margin-left:-200px; height:auto; z-index:100;background-color:#fff; border:1px #2aabd2 solid; padding:1px;}
      #DialogDiv h2{ height:25px; font-size:14px; background-color:#2aabd2; position:relative; padding-left:10px; line-height:25px;}
      #DialogDiv .form{padding:10px;}
      
</style>
  
<div class="container-fluid">
	<div id="BgDiv"></div>
	
	<!--遮罩层显示的DIV1-->
	<div id="DialogDiv" style="display:none">
		<h2>提示</h2>
	   	<div class="form">正在提交，请稍等。。。</div>
	</div>
	<div class="col-sm-12" id="workflow_opt">  
		<table id="flowInfo" style="border:1px solid 000;width:100%;" cellpaddingR="5" cellspacing="5" >
			<!-- 流程隐藏信息 -->
			<!-- 流程页面初始化参数 -->
			<input type="hidden" id="form_identity_" name="form_identity_" value="${param.formName}"/>
			<input type="hidden" id="flowKey_" name="flowKey_" value="${param.flowKey}"/>
			<input type="hidden" id="businessId" name="businessId" value="${param.businessId}"/>
			<input type="hidden" id="method" name="method" value="${param.method}"/>
			<!-- 流程页面执行参数 -->
			<input type="hidden" id="taskId" name="taskId"/>
			<input type="hidden" id="proInsId" name="proInsId"/>
			<input type="hidden" id="bpm_flow_excute_type" name="bpm_flow_excute_type"/>
			<input type="hidden" id="is_work_flow_" name="is_work_flow_"/>
			
			<!-- 流程审批记录展示 -->
			
			<tr>
				<td class="text-center col-sm-12" style="background-color:#e8e8e8" colspan="2"><strong>审批记录</strong></td>
			</tr>
			<tr>
				<td colspan="2">
					<table style="border:1px solid 000;width:100%;" cellpaddingR="5" cellspacing="5" >
						<tr>
							<td id="opinions-td" style="overflow:hidden; ">
								<iframe id="flowOpinions"  scrolling="no" frameborder=0 width="100%">
								</iframe>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			
			<!-- 特权人处理 -->
			<shiro:hasPermission name="com.maoye.ossp.bpm.workflow.admin">
					<tr id="workflow-admin-tr">
						<td colspan="2">
						  	<table style="border:1px solid 000;width:100%;" cellpadding="5" cellspacing="5" >  
						  		<tr>
							  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>流程操作:</strong></td>
							  		<td class="col-sm-8"><button type="button" data-toggle="modal" data-target="#adminOptModal" href="">特权人处理</button></td>
							  	</tr>
							  	<div class="modal fade"  id="adminOptModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-dialog">
									    <div class="modal-content">
									      <div class="modal-body" id="adminOptInfo">
									        	<iframe id="adminOptJsp" name="adminOptJsp" scrolling="no" frameborder="no" width="100%" height="500px"></iframe>
									      </div>
									    </div>
									</div>								    
								</div>
						  	</table>
						 </td>
					</tr>
			</shiro:hasPermission>
				
				
			<!-- 流程展示信息 -->
			<div id="workflow-show">
				<tr class="workflow-show">
			  		<td class="text-center col-sm-12" style="background-color:#e8e8e8" colspan="2"><strong>当前流程信息</strong></td>
			  	</tr>
				<tr class="workflow-show-tr">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>当前处理人:</strong></td>
			  		<td class="col-sm-8" id="extUser_td">
			  		</td>
			  	</tr>
			  	<tr class="workflow-show-tr">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>当前节点:</strong></td>
			  		<td class="col-sm-2" id="nodeDefName_td">
					</td>
			  	</tr>
			  	<tr class="workflow-show-tr">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>下一个节点:</strong></td>
			  		<td class="col-sm-2" id="outcomeNodes_td">
			  		</td>
			  	</tr>
			  	<tr id="curTaskUrl-tr" style="display: none">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>跳转到当前表单任务审批:</strong></td>
			  		<td class="col-sm-2" id="hisuser_td"><span></span></td>
			  	</tr>
			  	<tr id="workFlowEnd" style="display: none">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>流程状态:</strong></td>
			  		<td class="col-sm-8"><span>审批结束</span></td>
			  	</tr>
			</div>
			<!--流程展示信息  -->
			<div id="workflow-opt">
				<tr class="workflow-opt-task-tr">
			  		<td class="text-center col-sm-12" style="background-color:#e8e8e8" colspan="2"><strong>流程操作</strong></td>
			  	</tr>
				<tr class="workflow-opt-task-tr">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>操作:</strong></td>
			  		<td class="col-sm-2" id="opt-actionName">
			  			
					</td>
			  	</tr>
			  	<tr class="workflow-opt-task-tr" id="opt-nextNode-tr">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>下一节点任务:</strong></td>
			  		<td class="col-sm-2" id="opt-nextNode">
			  			
					</td>
			  	</tr>
			  	<tr id="editNode-admin-tr" style="display: none;">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>编辑节点处理人:</strong></td>
			  		<td class="col-sm-8"><button type="button" data-toggle="modal" id="editUserButton" data-target="#userOptModal" href="">编辑节点处理人</button></td>
				  	<div class="modal fade"  id="userOptModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
						<div class="modal-dialog">
						    <div class="modal-content">
						      <div class="modal-body" id="editNodeOptInfo">
						        	<iframe id="editNodeAdminOptJsp" name="editNodeAdminOptJsp" scrolling="no" frameborder="no" width="100%" height="500px"></iframe>
						      </div>
						    </div>
						</div>								    
					</div>
				</tr>
			  	<tr class="workflow-opt-task-tr">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>常用意见:</strong></td>
			  		<td class="col-sm-8">
			  			<ossp:select id="generalOpinions" name="generalOpinions" dictType="generalOpinions" onchange="setOpinion(this);">
			  			</ossp:select>
			  		</td>
			  		<td></td>
			  	</tr>
			  	<tr class="workflow-opt-task-tr">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>处理意见</strong></td>
			  		<td class="col-sm-8">
			  		<textarea id="opinionIdea" style="width:100%;height: 80px"   class="form-control col-sm-8"></textarea></td>
			  	</tr>
			  	<tr class="att-show">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8;width:20%;"><strong>附件:</strong></td>
			  		<td class="col-sm-8" id="att-show-td"> 
			  			<att:upload modleName="com.maoye.ossp.bpmagent.model.TaskInstance" key="workflow" soureBillID=""></att:upload>
			  		</td>
			  	</tr>
			  	<tr class="workflow-opt-task-tr">
			  		<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong></strong></td>
			  		<td class="col-sm-2">
			  		  <input id="btn_submit" class="btn btn-primary" type="button" onclick="btn_click_flow();"  value="提交"/>
					  <input class="btn btn-default" type="button" value="取消" onclick="history.go(-1)"/> 
			  		</td>
			  	</tr>
			</div>
		</table>
	</div>  
</div>